Integrand size = 27, antiderivative size = 174 \[ \int \frac {(3+3 \sin (e+f x))^2}{\sqrt {c+d \sin (e+f x)}} \, dx=-\frac {6 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{d f}-\frac {12 (c-3 d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {12 (c-2 d) (c-d) \operatorname {EllipticF}\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{d^2 f \sqrt {c+d \sin (e+f x)}} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.09, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2842, 2831, 2742, 2740, 2734, 2732} \[ \int \frac {(3+3 \sin (e+f x))^2}{\sqrt {c+d \sin (e+f x)}} \, dx=\frac {4 a^2 (c-2 d) (c-d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \operatorname {EllipticF}\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 d}{c+d}\right )}{3 d^2 f \sqrt {c+d \sin (e+f x)}}-\frac {4 a^2 (c-3 d) \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{3 d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {2 a^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 d f} \]
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2842
Rubi steps \begin{align*} \text {integral}& = -\frac {2 a^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 d f}+\frac {2 \int \frac {2 a^2 d-a^2 (c-3 d) \sin (e+f x)}{\sqrt {c+d \sin (e+f x)}} \, dx}{3 d} \\ & = -\frac {2 a^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 d f}-\frac {\left (2 a^2 (c-3 d)\right ) \int \sqrt {c+d \sin (e+f x)} \, dx}{3 d^2}+\frac {\left (2 a^2 (c-2 d) (c-d)\right ) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{3 d^2} \\ & = -\frac {2 a^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 d f}-\frac {\left (2 a^2 (c-3 d) \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{3 d^2 \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (2 a^2 (c-2 d) (c-d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{3 d^2 \sqrt {c+d \sin (e+f x)}} \\ & = -\frac {2 a^2 \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 d f}-\frac {4 a^2 (c-3 d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{3 d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {4 a^2 (c-2 d) (c-d) \operatorname {EllipticF}\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{3 d^2 f \sqrt {c+d \sin (e+f x)}} \\ \end{align*}
Time = 0.48 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.90 \[ \int \frac {(3+3 \sin (e+f x))^2}{\sqrt {c+d \sin (e+f x)}} \, dx=\frac {3 \left (-2 d \cos (e+f x) (c+d \sin (e+f x))+4 \left (c^2-2 c d-3 d^2\right ) E\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}-4 \left (c^2-3 c d+2 d^2\right ) \operatorname {EllipticF}\left (\frac {1}{4} (-2 e+\pi -2 f x),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right )}{d^2 f \sqrt {c+d \sin (e+f x)}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(720\) vs. \(2(239)=478\).
Time = 3.31 (sec) , antiderivative size = 721, normalized size of antiderivative = 4.14
method | result | size |
parts | \(\frac {2 a^{2} \left (c -d \right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )}{d \cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}+\frac {a^{2} \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {2 \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}{3 d}+\frac {2 \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )}{3 \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}-\frac {4 c \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-\sin \left (f x +e \right )-1\right ) d}{c -d}}\, \left (\left (-\frac {c}{d}-1\right ) E\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )+F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )\right )}{3 d \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}\right )}{\cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}-\frac {4 a^{2} \left (c -d \right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, \left (E\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c +E\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d -F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d \right )}{d^{2} \cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) | \(721\) |
default | \(-\frac {2 a^{2} \left (2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c^{2} d -12 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d^{2} c +10 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, F\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d^{3}-2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, E\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c^{3}+6 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, E\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c^{2} d +2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, E\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) c \,d^{2}-6 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (\sin \left (f x +e \right )-1\right ) d}{c +d}}\, \sqrt {-\frac {d \left (\sin \left (f x +e \right )+1\right )}{c -d}}\, E\left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d^{3}-\left (\sin ^{3}\left (f x +e \right )\right ) d^{3}-\left (\sin ^{2}\left (f x +e \right )\right ) c \,d^{2}+d^{3} \sin \left (f x +e \right )+c \,d^{2}\right )}{3 d^{3} \cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) | \(758\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.11 (sec) , antiderivative size = 465, normalized size of antiderivative = 2.67 \[ \int \frac {(3+3 \sin (e+f x))^2}{\sqrt {c+d \sin (e+f x)}} \, dx=-\frac {2 \, {\left (3 \, \sqrt {d \sin \left (f x + e\right ) + c} a^{2} d^{2} \cos \left (f x + e\right ) - 2 \, \sqrt {2} {\left (a^{2} c^{2} - 3 \, a^{2} c d + 3 \, a^{2} d^{2}\right )} \sqrt {i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right ) - 2 \, \sqrt {2} {\left (a^{2} c^{2} - 3 \, a^{2} c d + 3 \, a^{2} d^{2}\right )} \sqrt {-i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right ) + 3 \, \sqrt {2} {\left (-i \, a^{2} c d + 3 i \, a^{2} d^{2}\right )} \sqrt {i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right )\right ) + 3 \, \sqrt {2} {\left (i \, a^{2} c d - 3 i \, a^{2} d^{2}\right )} \sqrt {-i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right )\right )\right )}}{9 \, d^{3} f} \]
[In]
[Out]
\[ \int \frac {(3+3 \sin (e+f x))^2}{\sqrt {c+d \sin (e+f x)}} \, dx=a^{2} \left (\int \frac {2 \sin {\left (e + f x \right )}}{\sqrt {c + d \sin {\left (e + f x \right )}}}\, dx + \int \frac {\sin ^{2}{\left (e + f x \right )}}{\sqrt {c + d \sin {\left (e + f x \right )}}}\, dx + \int \frac {1}{\sqrt {c + d \sin {\left (e + f x \right )}}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(3+3 \sin (e+f x))^2}{\sqrt {c+d \sin (e+f x)}} \, dx=\int { \frac {{\left (a \sin \left (f x + e\right ) + a\right )}^{2}}{\sqrt {d \sin \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
\[ \int \frac {(3+3 \sin (e+f x))^2}{\sqrt {c+d \sin (e+f x)}} \, dx=\int { \frac {{\left (a \sin \left (f x + e\right ) + a\right )}^{2}}{\sqrt {d \sin \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(3+3 \sin (e+f x))^2}{\sqrt {c+d \sin (e+f x)}} \, dx=\int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2}{\sqrt {c+d\,\sin \left (e+f\,x\right )}} \,d x \]
[In]
[Out]